package com.ming.sportdemo.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("field")
public class Field {
    @TableId(type = IdType.AUTO)
    private Integer fieldId;
    private String fieldName;
    private String fieldLocation;
    @NotBlank(message = "价格不能为空")
    private double fieldPrice;
    private String fieldView;

    public Integer getFieldId() {
        return fieldId;
    }

    public void setFieldId(Integer fieldId) {
        this.fieldId = fieldId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getFieldLocation() {
        return fieldLocation;
    }

    public void setFieldLocation(String fieldLocation) {
        this.fieldLocation = fieldLocation;
    }

    public double getFieldPrice() {
        return fieldPrice;
    }

    public void setFieldPrice(double fieldPrice) {
        this.fieldPrice = fieldPrice;
    }

    public String getFieldView() {
        return fieldView;
    }

    public void setFieldView(String fieldView) {
        this.fieldView = fieldView;
    }

    @Override
    public String toString() {
        return "Field{" +
                "fieldId=" + fieldId +
                ", fieldName='" + fieldName + '\'' +
                ", fieldLocation='" + fieldLocation + '\'' +
                ", fieldPrice=" + fieldPrice +
                ", fieldView='" + fieldView + '\'' +
                '}';
    }
}
